package cn.sgzy.ssm.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.sgzy.ssm.service.UserService;
import cn.sgzy.ssm.vo.User;
@Controller
@RequestMapping("/user")
public class UserController {

	@Autowired
	UserService  userService;
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	@RequestMapping("/list")
	public String list(Model model){
		List<User>list=userService.findAll();
			model.addAttribute("list",list);
		return "userlist";
	}
	
	
}
